<admintpl file="header" />
</head>
<body>
    <div class="wrap">
        <ul class="nav nav-tabs">
            <li class="active"><a href="{:U('AdminUser/index')}">所有会员</a></li>
            <li><a href="{:U('AdminUser/addUser')}">添加会员</a></li>
        </ul>
        <form class="well form-search" method="post" action="{:U('Portal/AdminUser/soUser')}">
           <!--  用户类别:
            <select name="type" style="width: 120px;">
                <option value="0" >全部</option>
                <option value="1" <if condition="$_GET[type] eq 1">selected</if> >高级会员</option>
                <option value="2" <if condition="$_GET[type] eq 2">selected</if> >子会员</option>
                <option value="3" <if condition="$_GET[type] eq 3">selected</if> >普通会员</option>
            </select>&nbsp;&nbsp; -->
            用户名:
            <input type="text" name="user_login" style="width: 200px;" value="{$_GET[user_login]}" placeholder="请输入用户名">
            昵称:
            <input type="text" name="nickname" style="width: 200px;" value="{$_GET[nickname]}" placeholder="请输入昵称">
            <input type="submit" class="btn btn-primary" value="搜索" />
            <!--<a class="btn btn-danger" href="{:U('User/index')}">清空</a>-->
        </form>
        <form method="post" class="js-ajax-form" action="{:U('AdminUser/listorders')}">
            <!--<div class="table-actions">
                <button type="submit" class="btn btn-primary btn-small js-ajax-submit">{:L('SORT')}</button>
            </div>-->
            <table class="table table-hover table-bordered table-list">
                <thead>
                    <tr>
                        <!--<th width="50">{:L('SORT')}</th>-->
                        <th width="50">ID</th>
                        <th>用户名</th>
                        <th>昵称</th>
                        <th>头像</th>
                        <th>手机号码</th>
                        <th>房卡数量</th>
                        <th>输赢概率</th>
                        <th>token</th>
                        <th>注册时间</th>
                        <th>状态</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>

                <php>
                    $user_status[0]='正常';
                    $user_status[1]='被封';
                    $user_status[2]='限制登录';
                </php>
                <foreach name="users" item="vo">
                    <tr>
                        <td>{$vo.id}</td>
                        <td>{$vo.user_login}</td>
                        <td>{$vo.nickname}</td>
                        <td><img src="{:sp_get_image_preview_url($vo['img'])}" width='30' height='30'/></td>
                        <td>{$vo.mobile}</td>
                        <td>{$vo.fk}</td>
                        <td>{$vo.gailv}</td>
                        <td>{$vo.token}</td>
                        <td>{$vo.create_time}</td>
                        <td>{$user_status[$vo['status']]}</td>
                        <td>
                        <if condition="$vo['is_grade'] eq 1">
                            <a href='{:U("AdminUser/relationship",array("id"=>$vo["id"]))}'>子账号</a> |
                        </if>
                            <a href='{:U("AdminUser/edit",array("id"=>$vo["id"]))}'>{:L('EDIT')}</a> |
                            <a class="js-ajax-delete" href="{:U('adminUser/delete',array('id'=>$vo['id']))}">{:L('DELETE')}</a> |
                            <if condition="$vo['status'] neq 1">
                                <a href="{:U('adminUser/disable',array('id'=>$vo['id']))}" class="js-ajax-dialog-btn" data-msg="确认封号">封号</a>
                                <else />
                                <a href="{:U('adminUser/unDisable',array('id'=>$vo['id']))}" class="js-ajax-dialog-btn" data-msg="确认解封">解封</a>
                            </if>
                     <!--    <if condition="$vo['status'] neq 2">
                             | <a href="{:U('adminUser/Limit',array('id'=>$vo['id']))}" class="js-ajax-dialog-btn" data-msg="确认激活">限制登录</a>
                             <else />
                             <a href="{:U('adminUser/unLimit',array('id'=>$vo['id']))}" class="js-ajax-dialog-btn" data-msg="确认解封">解除限制</a>
                        </if> -->
                            <a href="/index.php/Portal/index/index/?token={$vo['token']}" target="_blank">登录</a>
                            
                        </td>

                    </tr>
                </foreach>


                </tbody>

            </table>
            <div class="pagination">{$page}</div>
        </form>
    </div>
    <script src="__PUBLIC__/js/common.js"></script>
</body>
</html>